/**
 * 
 */
package org.dbwebx.jcr.transaction.support;

import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.support.AbstractPlatformTransactionManager;
import org.springframework.transaction.support.DefaultTransactionStatus;

/**
 * @author Izzet_Mustafayev
 * 
 */
public class JcrTransactionManager extends AbstractPlatformTransactionManager {

	/**
	 * serialVersionUID.
	 */
	private static final long serialVersionUID = 1029380230973L;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.transaction.support.AbstractPlatformTransactionManager
	 * #doBegin(java.lang.Object,
	 * org.springframework.transaction.TransactionDefinition)
	 */
	@Override
	protected void doBegin(final Object transaction,
			final TransactionDefinition definition) throws TransactionException {
		if (!isExistingTransaction(transaction)) {

		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.transaction.support.AbstractPlatformTransactionManager
	 * #
	 * doCommit(org.springframework.transaction.support.DefaultTransactionStatus
	 * )
	 */
	@Override
	protected void doCommit(DefaultTransactionStatus status)
			throws TransactionException {
		status.setCompleted();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.transaction.support.AbstractPlatformTransactionManager
	 * #doGetTransaction()
	 */
	@Override
	protected Object doGetTransaction() throws TransactionException {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.transaction.support.AbstractPlatformTransactionManager
	 * #
	 * doRollback(org.springframework.transaction.support.DefaultTransactionStatus
	 * )
	 */
	@Override
	protected void doRollback(DefaultTransactionStatus status)
			throws TransactionException {
		status.setRollbackOnly();
	}

}
